# !/usr/bin/env python
# -*-coding:utf-8 -*-
"""
# File       : app.py
# Time       ：2023/1/14 22:34
# Author     ：Y-aong
# version    ：python 3.7
# Description：flask enter point
"""
from gevent import monkey; monkey.patch_all()  # 必须在任何其他导入之前调用
from apis import create_app
from conf.config import FlaskConfig
from public.api_utils.socket_namespace import register_socketio
from public.schedule_utils.apscheduler_config import scheduler

app = create_app()
socketio = register_socketio(app)

if __name__ == '__main__':
    scheduler.start()
    socketio.run(app, host=FlaskConfig.HOST, port=FlaskConfig.PORT)
